<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"
      xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>房屋预售信息列表</title>
    <link th:replace="common/header"/>
    <link rel="stylesheet" th:href="@{/css/tip.css}"/>
    <script type="text/javascript" th:src="@{/js/androidwheel/androidwheel.js}"></script>
    <script type="text/javascript" th:src="@{/js/layer/tip.js}"></script>
</head>
<body class="no-skin">
<div th:replace="common/top"/>
<div class="main-container ace-save-state" id="main-container">
    <div th:replace="common/menu"/>
    <div class="main-content">
        <div class="main-content-inner">
            <div th:replace="common/title"/>
            <div class="page-content">
                <div th:replace="common/skin"/>
                <div class="row">
                    <div class="col-xs-12">
                        <!-- PAGE CONTENT BEGINS -->
                        <h3 class="header smaller lighter blue"><i class="fa fa-list" aria-hidden="true"></i>房屋预售信息列表
                        </h3>
                        <form id="form" name="form" th:action="@{/houseBooking/getAll}" th:method="post"
                              th:object="${houseBookingForm}">
                            <div class="row-fluid">
                                <!--PAGE CONTENT BEGINS HERE-->
                                <div class="span4">
                                    <a class="btn btn-info" shiro:hasPermission="/houseBooking/add"
                                       th:href="@{/houseBooking/add}"><i class="fa fa-plus"
                                                                         aria-hidden="true"></i>添加</a>
                                    <button type="button" shiro:hasPermission="/houseBooking/deleteAll"
                                            class="btn btn-danger"
                                            th:onclick="'deleteAll(\'/houseBooking/deleteAll\');'"><i
                                            class="fa fa-times" aria-hidden="true"></i>删除
                                    </button>
                                </div>
                                <div class="span2">
                                    <div class="row-fluid">
                                        <div class="span1">
                                            <span class="input_text">省:</span>
                                        </div>
                                        <div class="span11">
                                            <select th:field="*{province}" id="province" name="province"
                                                    class="input_fix"
                                                    th:onchange="'provinceChange(this.value, null, \'全部\')'"
                                                    th:onclick="'provinceChange(this.value, null, \'全部\')'">
                                                <option value="">全部</option>
                                                <option th:each="province : ${provinceList}"
                                                        th:value="${province.provinceCode}"
                                                        th:text="${province.provinceName}">山东
                                                </option>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                                <div class="span2">
                                    <div class="row-fluid">
                                        <div class="span1">
                                            <span class="input_text">市:</span>
                                        </div>
                                        <div class="span11">
                                            <select th:field="*{city}" id="city" name="city" class="input_fix"
                                                    th:onchange="'cityChange(this.value, null, \'全部\')'"
                                                    th:onclick="'cityChange(this.value, null, \'全部\')'">
                                                <option value="">全部</option>
                                                <option th:each="city : ${cityList}"
                                                        th:value="${city.cityCode}" th:text="${city.cityName}">山东
                                                </option>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                                <div class="span2">
                                    <div class="row-fluid">
                                        <div class="span1">
                                            <span class="input_text">区:</span>
                                        </div>
                                        <div class="span11">
                                            <select th:field="*{region}" id="region" name="region"
                                                    class="input_fix">
                                                <option value="">全部</option>
                                                <option th:each="region : ${regionList}"
                                                        th:value="${region.regionCode}"
                                                        th:text="${region.regionName}">山东
                                                </option>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                                <div class="span2">
                                    <button class="btn btn-info" style="float: right;" type="button"
                                            onclick="pagechange(1);"><i class="fa fa-search"
                                                                        aria-hidden="true"></i>查询
                                    </button>
                                </div>
                            </div>
                            <table class="table">
                                <thead>
                                <tr>
                                    <td class="center" style="width:80px;"><label><a href="javascript:void(0);"
                                                                                     th:onclick="'selectAll(this)'">全/不选</a></label>
                                    </td>
                                    <td>新楼盘名称</td>
                                    <td class="hidden-480">详细地址</td>
                                    <td class="hidden-480">省-市-区</td>
                                    <td class="hidden-480">开盘价格</td>
                                    <td class="hidden-480">房屋面积（平方米）</td>
                                    <td class="hidden-480">联系电话</td>
                                    <td class="hidden-480">开发商</td>
                                    <td class="hidden-480">登记字号</td>
                                    <td class="hidden-480">备注</td>
                                    <td>操作</td>
                                </tr>
                                </thead>
                                <tbody>
                                <tr th:each="house: ${pi.records}">
                                    <td class="center"><label><input type="checkbox" name="selectIds"
                                                                     th:value="${house.id}"/><span
                                            class="lbl">&nbsp;</span></label></td>
                                    <td th:text="${house.name}">doudou</td>
                                    <td class="hidden-480" th:text="${house.address}">1-1-1-1</td>
                                    <td class="hidden-480"
                                        th:text="${house.provinceName} + '-' + ${house.cityName} + '-' + ${house.regionName}">
                                        山东-青岛-四方
                                    </td>
                                    <td class="hidden-480" th:text="${#numbers.formatDecimal(house.openPrice, 1, 2)}">
                                        商用
                                    </td>
                                    <td class="hidden-480"
                                        th:text="${#numbers.formatDecimal(house.houseArea, 1, 2) + '平方米'}">70
                                    </td>
                                    <td class="hidden-480" th:text="${house.phone}">70</td>
                                    <td class="hidden-480" th:text="${house.developer}">70</td>
                                    <td class="hidden-480" th:text="${house.loginNumber}">70</td>
                                    <td class="hidden-480" th:text="${house.memo}">70</td>
                                    <td>
                                        <a href="#" shiro:hasPermission="/houseBooking/edit"
                                           class="btn btn-warning btn-minier"
                                           th:href="@{'/houseBooking/edit?id=' + ${house.id}}" th:text="修改">修改</a>
                                        <a href="#" shiro:hasPermission="/houseBooking/delete"
                                           class="btn btn-danger btn-minier"
                                           th:href="@{'/houseBooking/delete?id=' + ${house.id}}" th:text="删除">删除</a>
                                        <a href="#" shiro:hasPermission="/houseBooking/view"
                                           class="btn btn-primary btn-minier"
                                           th:href="@{'/houseBooking/view?id=' + ${house.id}}" th:text="查看详情">查看详情</a>
                                        <a href="#" shiro:hasPermission="/houseImage/upload"
                                           class="btn btn-primary btn-minier"
                                           th:href="@{'/houseImage/houseBooking/upload?id=' + ${house.id}}"
                                           th:text="上传图片">上传图片</a>
                                    </td>
                                </tr>
                                </tbody>
                                <tfoot>
                                <tr>
                                    <td colspan="11">
                                        <div class="row-fluid" th:replace="common/page"/>
                                    </td>
                                </tr>
                                </tfoot>
                            </table>
                        </form>
                        <!-- PAGE CONTENT ENDS -->
                    </div><!-- /.col -->
                </div><!-- /.row -->
            </div><!-- /.page-content -->
        </div>
    </div><!-- /.main-content -->
    <div th:replace="common/footer"/>
</div><!-- /.main-container -->
<div th:replace="common/buttom"/>
<div th:replace="common/layer"/>
</body>
</html>
